Contents | < Browse | Browse >
What does WANT do for you?
WANT will search a textfile, like INDEX, for instances of words you
supply. For example, let's say you have the AmiNET INDEX file that
lists all the files available from that mirror site. You want to know
if a file called AGATE is in the list. WANT will search the file,
looking for any instance of the word AGATE. Each line of the INDEX file
that contains the word AGATE will be displayed on the screen.
Let's try another example using INDEX - you want to find all the
lines that contain the words DATATYPE and GIF. WANT will display any
lines that have both words in it. WANT will also find lines with
DATATYPE or GIF, thus narrowing your search. Use the cycle gadget
labelled AND OR to select the function to use.
The Execute button
Want gives you many options to select from the operating panel. After
you select all of the options necessary, click the Execute button.
This button tells WANT to begin retrieving the information you asked
for.
Selecting a File with the File Requester
You must select a file to search or view. If you forget, WANT will
prompt you select a file from the file requester.
The requester used in WANT was custom written for this application.
It has some features you may not have seen before. To select a file
or directory, just click the mouse once. Multiselection is not
supported. The four buttons at the bottom are:
PARENT, DRIVES, VOLUMES, and DIR.
PARENT
This button will select the directory above the one you are in. There
is another, faster, way to invoke PARENT. Place the mouse pointer against
the left edge of the screen and press the Left Mouse Button.
DRIVES
This will display all the physical devices attached to your Amiga. It
will show hard drives, floppys, CD players, RAM, RAD, and others.
VOLUMES
This will display all ASSIGNS and VOLUMES seen by the system.
DIR
Since the Amiga is a multitasking beast, you might leave WANT to do
something else and then come back. The contents of the requester may
have changed in the meantime. By pressing DIR, the directory listing
is updated.
Viewing a Text File without searching for terms
WANT will also display any selected file with the filereader of your
choice. To read a selected file, select the "View a file" option
then click Execute. You cannot search for terms when in this mode.
Redirecting the output to a Text Editor
Instead of a filereader, you may direct the output of WANT to the text
editor of your choice. To do this, select the "Search and Edit" option.
This option works like "Search and View", but no highlighting is
permitted (or wanted). The default EDITOR is ED, but you can change
that to your favorite with the tooltype. Be sure to include the full path
to the editor.
If you want to edit an entire file with the editor:
Select a file
Enter an asterick (*) as the ONLY search term
Select "Search and Edit"
Execute
This will bring the entire file into your editor. Remember to
SAVE AS when you save an edited file. The filename has been changed.
The Asterick (*), as a single search term, is considered a wildcard,
meaning all lines of the file will be 'found' and displayed.
Also see wildcards
Highlighting words found by a search
The word or words you asked to see are, by default, bolded. This
helps you locate the word more quickly. You can change the kind of
highlighting with the checkboxes labelled BOLD, ITALIC, UNDERLINE,
and REVERSE. You may use any or all of these options. Experiment
with the buttons to see which type of highlighting you prefer.
The checkmark box on the screen labelled HIGHLIGHT will allow you to
disable the highlighting when checked.
Clearing the text entry fields
The button called CLEAR will erase the two text entry fields so you
may enter new data. These fields can be erased individually by
pressing Control X.
Displaying extra lines on a search
Not all files are as predictable as a mirror's INDEX. For example,
the file you want to search may be an email letter or DOC file.
By simply asking WANT to find a word and display the line that
word was found in, you won't be able to see the word in it's
proper context. Ideally, you would like to see a few lines before
the word and a few lines after the word. The gadgets labelled
LEADING LINES and TRAILING LINES let you select how many lines
to display before and after the line with the word in it.
Whole Word searches
Normally, WANT will find a search term within another word. For
example, if you ask for bet, WANT will find better.
If you want to search for examples of whole words, just check the
Whole Words box. Now your entry will be treated as if you typed a
space before and after the word. Due to the nature of Grep, you may
get some matches with non-alpha characters preceeding the term.
Example: A Whole Word search for File may find +File or 2File. This
limitation will be overcome in the next version.
Case Sensitivity
Normally, WANT will treat your entries without regard to Case. If you
need the case to be sensitive, check the Case Sense box.
A pecularity of AmigaGuide
If you use AmigaGuide as your filereader, you may find that searching
an AmigaGuide document can give unpredictable results. If your search
term is found in a line that begins with @NODE, AmigaGuide will get
very confused. To see the results properly, try using the editor or a
different filereader.
For more detailed instructions on the operation of WANT and some
ideas on how to use it to your advantage, see hot tips.